package com.bg.print.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.bg.print.dto.OrderDto;
import com.bg.print.entity.OrderEntity;
import com.bg.print.utils.PageUtils;
import org.springframework.security.core.userdetails.UserDetails;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 订单
 *
 * @author liuxvru
 * @email liuxvru@163.com
 * @date 2024-03-25 17:50:46
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderDto saveOrderDto(OrderDto order, UserDetails userDetails);

    OrderDto getOrderDtoById(Long id);

    Integer requestMoney(Long id, UserDetails userDetails);

    PageUtils getMyOrder(UserDetails userDetails, Map<String, Object> params);

    Integer qcancelOrder(Long id, UserDetails userDetails);

    Integer deleteByIds(List<Long> list, UserDetails userDetails);

    Integer okcancelOrder(Long id);

    Integer oktMoney(Long id, BigDecimal money);

    Integer buy(OrderEntity order, Long id, BigDecimal money);

    Integer toPrinting(Long id);

    Integer okPrint(Long id);

    Integer okOrder(Long id, UserDetails userDetails);

    Integer nocancelOrder(Long id);

    Integer cancelCancelOrder(Long id, UserDetails userDetails);

    OrderEntity getByIdAndUser(String traceNo, UserDetails userDetails, double totalAmount);

    OrderEntity getByTradeNo(String alipayTraceNo, String traceNo, double totalAmount);

    Integer nobuy(Long id);
}

